import { AnimationClip } from 'cc'
import State from '../Base/State'
import { StateMachine } from '../Base/StateMachine'
import { SubStateMachine } from '../Base/SubStateMachine'
import {
  DIRECTION_ENUM,
  DIRECTION_ORDER_ENUM,
  PARAMS_NAME_ENUM,
  SPIKE_COUNT_ENUM,
  SPIKES_COUNT_MAP_NUMBER_ENUM,
} from '../Enums'
import DirectionSubStateMachine from '../Base/DirectionSubStateMachine'

export default class SpikesSubStateMachine extends SubStateMachine {
  run() {
    const value = this.fsm.getParams(PARAMS_NAME_ENUM.SPIKES_CUR_COUNT)
    this.currentState = this.stateMachines.get(SPIKES_COUNT_MAP_NUMBER_ENUM[value as number])
  }
}
